package datasv.framework_datasv;

import data.datafactory.DatabaseOperator;

public class ChangeCondition {
	public static void main(String[] args) {
		System.out.println(new ChangeCondition().changeChooseCrossMajor());
	}
	public boolean changeChooseCurriculum() {
		return change("1");
	}

	public boolean changeChooseCrossMajor() {
		return change("2");
	}

	public boolean changeChoosePublic() {
		return change("3");
	}

	private boolean change(String i){
		DatabaseOperator op=new DatabaseOperator("= =");
		String changeTo;
		if(op.getOneInform(i, "condition_list", "switcher").equals("0")){
			changeTo="1";
		}
		else{
			changeTo="0";
		}
		if(op.setOneInform(i,changeTo,"condition_list","switcher")){
			return true;
		}else{
			return false;
		}
	}
}
